new Vue({
	el: '#container',
	data: {
		rendered: false,
		mediaReport: {}
	},
	mounted: function() {
		var queryObject = $Common.getUrlParams();
		this.getMediaReportById(queryObject.id);
	},

	methods: {
		getMediaReportById: function(id) {
			var that = this;
			$.ajax({
				url: window.HOST_NAME + 'mediaArticle/detail',
				data: {
					id: id,
					source: 1
				},
				method: 'GET',
				success: function(res) {
					var data = res.data;
					data.updated = $Common.formatDate(data.updated);
					that.mediaReport = data;
					that.rendered = true;
				},
				error: function() {
					$Common.showToast('请求失败，请重试');
				}
			});
		}
	}
});